﻿using System.ComponentModel;

namespace Hr.Models.Common
{
    /// <summary>
    /// 员工工资标准
    /// </summary>
    public class SalaryStandard
    {
        public SalaryStandard()
        {
            Base = new SalaryBasic();
            MeritPayType = 1;
        }

        /// <summary>
        /// 基本工资
        /// </summary>
        public SalaryBasic Base { get; set; }

        /// <summary>
        /// 绩效奖金
        /// </summary>
        public double MeritPay { get; set; }

        /// <summary>
        /// 其他奖金
        /// </summary>
        public double Others { get; set; }

        /// <summary>
        /// 算绩效的方法
        /// </summary>
        public int MeritPayType { get; set; }

        /// <summary>
        /// 每小时工资
        /// </summary>
        public double SalaryPerHours
        {
            get { return Total / 21.75 / 8; }
        }

        public double Total
        {
            get { return Base.PositionSalary + Base.PositionOther + Base.FullWork + Base.WorkYear; }
        }
    }

    /// <summary>
    /// 基本工资
    /// </summary>
    [DisplayName("标准工资")]
    public class SalaryBasic
    {
        [DisplayName("岗位工资")]
        public double PositionSalary { get; set; }

        /// <summary>
        /// 岗位津贴
        /// </summary>
        public double PositionOther { get; set; }

        /// <summary>
        /// 满勤奖
        /// </summary>
        public double FullWork { get; set; }

        /// <summary>
        /// 工龄补贴
        /// </summary>
        public double WorkYear { get; set; }
    }
}
